﻿using System;
using System.Collections.Generic;
using System.Globalization;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Data;
using System.Windows;

namespace CustomControls.ConvertHelp
{
    public class BoolToVisibleConverter : IValueConverter
    {
        #region Converter

        public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
        {
            Visibility itmV = Visibility.Collapsed;
            if (value != null)
            {
                bool flg = (bool)value;

                itmV = flg ? Visibility.Visible : Visibility.Collapsed;
            }
            return itmV;

        }

        public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
        {
            return null;
        }
        #endregion

    }
}
